package com.zbkj.service.dao.saleroom;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zbkj.common.model.saleroom.RoomProduct;
import com.zbkj.common.request.ProductAttrValueSearchRequest;
import com.zbkj.common.response.TransferOrderProductAttrValueResponse;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 商品门店关系表 Mapper 接口
 * </p>
 *
 * @author keNan
 * @since 2025-04-09
 */
public interface RoomProductDao extends BaseMapper<RoomProduct> {

    /**
     * 查询门店商品库存信息
     *
     * @param roomId
     * @param attrValueId
     * @return
     */
    RoomProduct getByRoomIdAndProductSpecsId(@Param("roomId") Integer roomId, @Param("attrValueId") Integer attrValueId);

    /**
     * 根据id查询
     *
     * @param idList
     * @return
     */
    List<RoomProduct> selectListByIdList(@Param("idList") List<Integer> idList);

    /**
     * 根据门店id列表查询规格列表
     *
     * @param roomIdList
     * @return
     */
    List<RoomProduct> getProductSpecsIdListByRoomIdList(@Param("roomIdList") List<Long> roomIdList);

    /**
     * 查询门店下的商品
     *
     * @param productAttrValueSearchRequest
     * @return
     */
    List<TransferOrderProductAttrValueResponse> selectProductAttrValueList(@Param("productAttrValueSearchRequest") ProductAttrValueSearchRequest productAttrValueSearchRequest, @Param("storeId") Integer storeId,@Param("categoryIdList") List<Integer> categoryIdList);
}
